script

The Linux script command records every command and the subsequent result and saves them in a background typescript file from your terminal session.

Format for creating script log file: <date>-<start_time>-<name>.log

script 03-21-2021-0200pm-exploitation.log
Cry0l1t3@htb[/htb]$ script 03-21-2021-0200pm-exploitation.log
Cry0l1t3@htb[/htb]$ <ALL THE COMMANDS>
Cry0l1t3@htb[/htb]$ exit